<!DOCTYPE html>
<html lang="zh-cn">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>数组新增和删除</title>
</head>

<body>

</body>

</html>
<script>
    let arr0 = ['java', 'C#'];
    window.console.log(arr0);
    let a = arr0.push('python');
    window.console.log(a);
    window.console.log(arr0);

    let b = arr0.pop();
    window.console.log(b);
    window.console.log(arr0);

    let c = arr0.shift();
    window.console.log(c);
    window.console.log(arr0);

    let d = arr0.unshift('scala');
    window.console.log(d);
    window.console.log(arr0);
</script>